package cn.stylefeng.guns.sys.modular.tao.mapper;

import cn.stylefeng.guns.sys.modular.tao.entity.Region;
import cn.stylefeng.guns.sys.modular.tao.model.params.RegionParam;
import cn.stylefeng.guns.sys.modular.tao.model.result.RegionResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 行政区域划分等级 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2019-08-24
 */
@Repository
public interface RegionMapper extends BaseMapper<Region> {

    /**
     * 获取列表
     *
     * @author 
     * @Date 2019-08-24
     */
    List<RegionResult> customList(@Param("paramCondition") RegionParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 
     * @Date 2019-08-24
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") RegionParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 
     * @Date 2019-08-24
     */
    Page<RegionResult> customPageList(@Param("page") Page page, @Param("paramCondition") RegionParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author 
     * @Date 2019-08-24
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") RegionParam paramCondition);

    List<Region> listsByS();

    List<Region> listsByP(@Param("parentCode") String parentCode);

    Region getAreaNameByCode(@Param("area") String area);

    List<Region> listsByAllCity(@Param("parentCode")String parentCode);

    List<Region> listsBySAll();
}
